package com.miao.common.exceptionhandler;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author MiaoWenqing
 * @description: 自定义异常类
 * @date 2021/1/16 16:23
 */
public class MyException extends RuntimeException{


    private int code;//状态码
    private String msg;//异常信息

    public MyException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public MyException() {
    }


    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
